package com.jvtd.utils;

import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;

/**
 * Created by Administrator on 2017/11/23.
 */

public class ChannelUtils
{
  public static String getChannelValue(Context context) {
    String value= "jvtd";
    String channelNameKey = "CHANNEL_NAME";
    try {
      ApplicationInfo appInfo =context.getPackageManager()
          .getApplicationInfo(context.getPackageName(),
              PackageManager.GET_META_DATA);
      value = appInfo.metaData.getString(channelNameKey);
    } catch (PackageManager.NameNotFoundException e) {
      e.printStackTrace();
    }
    return value;
  }
}
